1. Technical Field
This disclosure generally relates to computer systems, and more specifically relates to use of hardware accelerators in computer systems.
2. Background Art
Hardware accelerators of various types have been developed to speed the execution of certain functions in a computer system. For example, graphics accelerators are well-known in the art, and allow graphic functions to be offloaded from the processor to a dedicated hardware accelerator that can perform the graphic functions in much less time than it would take the processor. Floating-point processors are another type of hardware accelerator that allows a processor to offload floating point operations. More recent developments have produced other types of hardware accelerators, including accelerators for processing eXtensible Markup Language (XML), accelerators for performing compression and decompression, and accelerators for performing encryption and decryption. As used herein, the term “hardware accelerator” extends to any hardware to which a processor may allocate functions to perform.
In the prior art, programmers were required to have knowledge that a hardware accelerator would be present in the system, and would then decide in the code which functions to allocate to the hardware accelerator. Referring to FIG. 2, a prior art method 200 shows such an approach. The programmer writes the computer program (step 210). The programmer decides which functions to allocate to the hardware accelerator (step 220). The programmer then writes the code to allocate functions to the hardware accelerator (step 230). Thus, in the prior art, all decisions regarding what functions are performed by the hardware accelerator are made by a human programmer at the time the programmer writes the code. The result is code that is inflexible and cannot fully take advantage of the hardware accelerator. Without a way to dynamically determine at run-time functions to allocate to a hardware accelerator, the performance of a computer system that has a hardware accelerator will not be optimized.